package com.jwsoft.manager.core.dao.model;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 
 *
 * @author zhiyuan
 * @since 2023-02-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("edu_work_order_log")
@Schema(name = "EduWorkOrderLog", title = "", description = "实体类")
public class EduWorkOrderLog extends Model<EduWorkOrderLog> {

    private static final long serialVersionUID = 1L;

    @Schema(name = "workOrderLogId", title = "主键")
    @TableId(value = "work_order_log_id", type = IdType.ASSIGN_ID)
    private Long workOrderLogId;

    @Schema(name = "workOrderId", title = "工单id	")
    @TableField(value = "work_order_id")
    private Long workOrderId;

    @Schema(name = "type", title = "类型1 工单提交 2 工单流转 3 工单处理")
    @TableField(value = "type")
    private String type;

    @Schema(name = "userId", title = "处理人用户id")
    @TableField(value = "user_id")
    private String userId;

    @Schema(name = "fullName", title = "处理人用户姓名")
    @TableField(value = "full_name")
    private String fullName;

    @Schema(name = "orgId", title = "处理人组织id")
    @TableField(value = "org_id")
    private String orgId;

    @Schema(name = "orgName", title = "处理人组织名称")
    @TableField(value = "org_name")
    private String orgName;

    @Schema(name = "handleStatus", title = "处理状态")
    @TableField(value = "handle_status")
    private String handleStatus;

    @Schema(name = "handleTime", title = "处理时间")
    @TableField(value = "handle_time")
    private Date handleTime;

    @Schema(name = "handleMessage", title = "处理描述")
    @TableField(value = "handle_message")
    private String handleMessage;

    @Schema(name = "nextUserId", title = "下级处理人")
    @TableField(value = "next_user_id")
    private String nextUserId;

    @Schema(name = "nextFullName", title = "下级处理人姓名")
    @TableField(value = "next_full_name")
    private String nextFullName;

    @Schema(name = "nextOrgId", title = "下级处理组织")
    @TableField(value = "next_org_id")
    private String nextOrgId;

    @Schema(name = "nextOrgName", title = "处理人组织名称 ")
    @TableField(value = "next_org_name")
    private String nextOrgName;

    @Schema(name = "finishFlag", title = "是否最终处理节点")
    @TableField(value = "finish_flag")
    private String finishFlag;

    @Override
    public Serializable pkVal() {
        return this.workOrderLogId;
    }
}
